﻿package com.msjt.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.msjt.dao.IndustryDAO;
import com.msjt.entity.Industry;
import com.msjt.service.IIndustryService;
/**
 * name:IndustryService
 * function:主要行业业务逻辑实现类
 * author: kw
 * time:2013.8.27
 */
public class IndustryService implements IIndustryService {
	@Resource
	private IndustryDAO industryDao;
	
	public IndustryDAO getIndustryDao() {
		return industryDao;
	}
	public void setIndustryDao(IndustryDAO industryDao) {
		this.industryDao = industryDao;
	}
	/**
	 * 根据ID获取一个主营行业的信息
	 * @param industry 主营行业ID
	 * @return
	 */
	public Industry getIndustryById(Industry industry) {
		return this.industryDao.getIndustryById(industry);
	}
	/**
	 * 分页取出主营行业信息
	 * @param pageSize
	 * @param pageIndex
	 * @return
	 */
	public List<Industry> getIndustryPage(int pageSize, int pageIndex) {
		return this.industryDao.getIndstryByPage(pageSize, pageIndex);
	}
	/**
	 * 获取主页面上显示的6个信息
	 * @return
	 */
	public List<Industry> getIndustryIndex() {
		return this.industryDao.getIndexIndustry();
	}
	/**
	 * 计算行业个数
	 * @return
	 */
	public Integer getIndustryCount() {
		return this.industryDao.getIndustryCount();
	}
	/**
	 * 添加主营方向信息
	 * @param industry
	 * @return
	 */
	public boolean addIndustry(Industry industry) {
		return this.industryDao.addIndustry(industry);
	}
	/**
	 * 修改主营方向信息
	 * @param industry
	 * @return
	 */
	public boolean updateIndustry(Industry industry) {
		return this.industryDao.updateIndustry(industry);
	}
	/**
	 * 删除主营方向信息
	 * @param industry
	 * @return
	 */
	public boolean deleteIndustry(Industry industry) {
		return this.industryDao.delteIndustry(industry);
	}
	public boolean deleteMore(String idString) {
		// TODO Auto-generated method stub
		return this.industryDao.deleteMore(idString);
	}
	public List<String> getIndustryPath(String idString) {
		// TODO Auto-generated method stub
		return this.industryDao.getIndustryPath(idString);
	}

}
